<%@ page language="java" contentType="text/html; charset=UTF-8" import="com.agentlab.imitation.common.*" pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/share/taglib.jsp" %>
<%  String path = request.getContextPath(); %>
<html><head>
<title>模拟填报 - 重庆模拟志愿填报系统</title>
	<link href="<%=path%>/style/imitation.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="<%=path%>/script/jquery-1.3.2.min.js"></script>
	<script type="text/javascript" src="<%=path%>/script/jquery.PrintArea.js"></script>
<script language="JavaScript" type="text/JavaScript">
$(document).ready(function(){
	  $("#print_button").click(function(){
		$("div#printArea").printArea();
		});
});

function printArea(){
	document.getElementById("printArea").printArea(); 
}
function getBrowser()
{
	if (window.navigator['appName'].substr(0,8)=='Netscape') 
	{
		return "Moz";
	}
	else if (window.navigator['appName'].substr(0,9)=='Microsoft') 
	{
		return "IE";
	}
	else
	{
		return "unknown";
	}
}
<!--
var browser = getBrowser();
//var Opacity = 0;
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
/*
function pageHeight(){ //当前页面高度
	alert(document.compatMode);
	if($.browser.msie){ 
	return document.compatMode == "CSS1Compat"? document.documentElement.clientHeight : 
	document.body.clientHeight; 
	}else{ 
	return self.innerHeight; 
	} 
	}; 
*/
function getScrollTop() //返回值就是当前页面滚动条的高度
{
    var scrollTop=0;
    if(document.documentElement&&document.documentElement.scrollTop)
    {
        scrollTop=document.documentElement.scrollTop;
    }
    else if(document.body)
    {
        scrollTop=document.body.scrollTop;
    }
    return scrollTop;
}

function openDialog(position)
{
	dialogHeight = 436;
	dialogWidth  = 750;
	oDiv = document.getElementById('dialog');
	//oDiv.style.visibility = 'visible';	
	oDiv.style.display = 'block';
	oDiv.style.left = document.body.scrollLeft + (document.body.clientWidth - dialogWidth) / 2;

	//设置高度长度
	if (document.body.offsetHeight>dialogHeight){
		oDiv.style.top = document.body.scrollTop + (document.body.clientHeight - dialogHeight) / 2;	
	} else {
		oDiv.style.top = document.body.scrollTop;
	}
	
	oDiv.style.top = getScrollTop(); 
	//alert(oDiv.style.top);
	showDialogBg();
	document.getElementById('position').value   = position;
	
}

function closeDialog()
{
	//$('dialog').style.visibility = 'hidden';
	document.getElementById('dialog').style.display = 'none';
	hideDialogBg();
}

function dialogDrag(ID, event)
{
	//alert(ID);
	var oDialog = $(ID);
	setOpacity(ID, 80);
	
	oDialog.setCapture ? oDialog.setCapture() : function(){};
	var currX = event.clientX;
	var currY = event.clientY;	
	oDialog.onmousemove = dialogMove;
	oDialog.onmouseup   = dialogStop;
	function dialogMove()
	{
		var offsetX = event.clientX - currX;
		var offsetY = event.clientY - currY;		
		oDialog.style.left = offsetX + parseInt(oDialog.style.left);
		oDialog.style.top  = offsetY + parseInt(oDialog.style.top);		
		currX = event.clientX;
		currY = event.clientY;	
	}
	function dialogStop()
	{
		oDialog.onmousemove = function() {return false};
		oDialog.onmouseup = function() {return false};
		oDialog.releaseCapture ? oDialog.releaseCapture() : function(){};
		setOpacity(ID, 100);
	}
}

function showDialogBg()
{
	oDiv = document.getElementById('dialogBg');
	
	oDiv.oncontextmenu = function () {return false;};
	oDiv.style.visibility = "visible";
	
	setOpacity('dialogBg', 50);

	//timerId = window.setInterval("dialogBgShade()", 100);
	
	//alert("document.body.scrollHeight="+document.body.scrollHeight);
	//alert("document.body.clientHeight="+document.body.clientHeight);
	//oDiv.style.height = document.body.scrollHeight;
	oDiv.style.height = document.body.clientHeight + 800;
	oDiv.style.width  = document.body.scrollWidth;		
}
function setOpacity(id, myOpacity)
{
	browser = getBrowser();
	oObj = document.getElementById(id);
	if (oObj)
	{
		if (browser=='IE')	{
			oObj.style.filter = "Alpha(Opacity=" + myOpacity + ")";
		} else if (browser == 'Moz'){
			omzOpacity = myOpacity/100;
			oObj.style.opacity = omzOpacity;	
		}
	}
}

function hideDialogBg()
{
	dialogBgId = 'dialogBg';
	document.getElementById(dialogBgId).style.visibility = "hidden";
}

/*
function dialogBgShade()
{
	if (Opacity == 40)
	{
		Opacity = 0;
		window.clearInterval(timerId);
		return true;
	}
	Opacity = ( Opacity + 10 ) > 40 ? 40 : Opacity + 5
	setOpacity('dialogBg', Opacity);	 	
}
*/

function mySubmit(myForm)
{
	oObj = myForm.prescore;

	if (isNaN(parseInt(oObj.value)) || parseInt(oObj.value)<100 || parseInt(oObj.value)>900)
	{
		alert('请输入正确的预估分！');
		oObj.focus();
		return false;
	}
	return true;
}


//-->
</script>
</head>
<body leftmargin="0" bgcolor="#FFFFFF" marginwidth="0">


<jsp:include page="dialog.jsp"/>

<center>

	 <jsp:include page="/head.jsp"/>
 <div id="printArea">
  <table  border="0" cellpadding="0" cellspacing="0" width="950">
    <tbody><tr>
      <td align="center" bgcolor="#B1DE9B">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody><tr>
          <td>
            <jsp:include page="user_info.jsp"/>
            <table border="0" cellpadding="0" cellspacing="0" width="930">
              <tbody><tr>
                <td background="<%=path%>/images/mn_11.gif" height="27"><table border="0" cellpadding="0" cellspacing="0">
                    <tbody><tr>
                      <td>&nbsp;</td>
                      <td style="padding-top: 4px; padding-left: 7px;" align="center" background="<%=path%>/images/mn_12.gif" height="27" width="95"><b>快捷模式</b></td>
                      <td width="3"></td>
                      <td style="padding-top: 9px;" align="center" background="<%=path%>/images/mn_13.gif" height="27" width="102"><a href="<%=path%>/front/wishlist_advanceCard.action" class="a04">高级模式</a></td>
                    </tr>
                </tbody></table></td>
              </tr>
              <tr>
                <td style="padding-right: 12px;" align="right" bgcolor="#FFFFFF" height="33" valign="bottom"> <img id="print_button" src="<%=path%>/images/printer.gif" border="0" ></td>
              </tr>
              <tr>
                <td bgcolor="#FFFFFF">			
				
				
				<c:forEach var="pc_index" begin="2" end="4" step="1"> <!-- 批次循环 -->
				<table border="0" cellpadding="0" cellspacing="15" width="100%">
                  <tbody><tr>
                    <td>
                    <table style="border: 1px solid rgb(137, 201, 117);" bgcolor="#89C975" border="0" cellpadding="0" cellspacing="0" width="100%">
                      <tbody>
                      <tr>
                        <td align="center" bgcolor="#B1DE9B" width="14%"><b style="color:#274401">本科<c:if	test="${pc_index==2}">一</c:if>
																																<c:if test="${pc_index==3}">二</c:if>
																																<c:if test="${pc_index==4}">三</c:if>批</b></td>
                        <td width="86%">
						
						<table border="0" cellpadding="0" cellspacing="0" width="100%">
						   <tbody><tr align="center" bgcolor="#B1DE9B">
						   			<c:forEach var="yxzyxh_index" begin="1" end="<%=CommonConstant.NUM_YX %>" step="1"> <!-- 院校循环 -->
									<td bgcolor="#89C975" valign="top" width="<%=100/CommonConstant.NUM_YX %>%">
									
									
									  <table cellpadding="0" cellspacing="0" width="100%">
									<tbody><tr>
									  <td style="border-left: 1px solid rgb(137, 201, 117);" align="center" bgcolor="#B1DE9B" height="30">
									<b style="color:#274401">
									    第<c:if test="${yxzyxh_index==1}">一</c:if>
										<c:if test="${yxzyxh_index==2}">二</c:if>
										<c:if test="${yxzyxh_index==3}">三</c:if><c:if test="${yxzyxh_index==4}">四</c:if><c:if test="${yxzyxh_index==5}">五</c:if>
										<c:if test="${yxzyxh_index==6}">六</c:if>
										志愿
									</b>									
									</td>
									</tr>
									
									<tr align="center" bgcolor="#EBF8E7">
									  <td style="border-top: 1px solid rgb(137, 201, 117); border-left: 1px solid rgb(137, 201, 117);" height="30">
										<c:set var="is_exist" value="false" scope="page"/> <!--  是否有院校存在 -->
										<c:set var="yxmc_writed" value="false" scope="page"/> <!-- 已经找到对应院校 -->
										<c:set var="yxdh" value="" scope="page"/>  <!--  本志愿院校代号 -->
										 <c:if test="${!empty wishs}">
									    <c:forEach items="${wishs}" var="entry">
											<c:if test="${entry.id.pc==pc_index and entry.id.yxzyxh==yxzyxh_index and yxmc_writed==false}">
												<b><a href="http://exam.edu.sina.com.cn/collegedb/collegeindex.php?collegeid=<c:out value='${entry.yxdh}'/>" target="_blank" class="a04" style="text-decoration: underline;"><c:out value="${entry.yxmc}" /></a></b>
												<c:set var="is_exist" value="true" scope="page"/>
												<c:set var="yxdh" value="${entry.yxdh}" scope="page"/> 
												<c:set var="yxmc_writed" value="true" scope="page"/>
											</c:if>
										</c:forEach>
										</c:if>
										<c:if test="${is_exist == false}">
											<img src="<%=path%>/images/mn_15.gif" style="cursor: pointer;" onclick="openDialog(<c:out value='${pc_index}'/><c:out value='${yxzyxh_index}'/>0);" border="0" height="19" width="110">
										</c:if>

									  </td>
									</tr>
									<!-- 专业开始 -->
									<c:if test="${is_exist == true}">	<!-- 存在院校 -->
									<tr>
									  <td>
									    <table bgcolor="#FFFFFF" border="0" cellpadding="0" cellspacing="0" width="100%">
    									 <tbody>
    									  <c:forEach var="zyzyxh_index" begin="1" end="<%=CommonConstant.NUM_ZY %>" step="1"> <!-- 专业循环 -->
    									 	<tr>
                                            <td style="border-top: 1px solid rgb(137, 201, 117); border-left: 1px solid rgb(137, 201, 117);" height="30">
											   <div align="center">
											   <c:set var="zy_exist" value="false" scope="page"/>
											    <c:forEach items="${wishs}" var="entry">
												<c:if test="${entry.id.pc==pc_index and entry.id.yxzyxh==yxzyxh_index and entry.id.zyzyxh==zyzyxh_index}">
													<c:out value="${entry.zymc}" />  
													<c:set var="zy_exist" value="true" scope="page"/>
												</c:if>
												</c:forEach>
												<c:if test="${zy_exist == false}">
													<a href="<%=path%>/front/wishlist_yxzySingle.action?yxmc=<c:out value='${entry.yxmc}' />&yxdh=<c:out value='${yxdh}'/>&position=<c:out value='${pc_index}'/><c:out value='${yxzyxh_index}'/><c:out value='${zyzyxh_index}'/>"><img width="86" height="19" border="0" src="<%=path%>/images/mn_16.gif"></a>
												</c:if>
												</div>
											 </td>
                                         	</tr>
											 </c:forEach><!-- 专业循环 -->
                                        </tbody></table>
									  </td>
									</tr>
									</c:if>
									<!-- 专业结束 -->
									
																		
									 </tbody></table>
									 
								    </td>
								     </c:forEach><!-- 院校循环 -->
                                		
                                
								</tr>
								
                        </tbody></table>

						</td>
                        </tr>
                    </tbody></table></td>
                  </tr>
                </tbody></table>
               </c:forEach> <!-- 批次循环 -->
				
				
				
				</td>
              </tr>
            </tbody></table></td>
        </tr>
      </tbody></table>
      </td>
    </tr>
  </tbody></table>
	</div>
 
 <jsp:include page="/foot.jsp"/>
</center>
</body></html>